package com.cloudfun.campusshare.common.constant;

import org.apache.commons.lang3.StringUtils;

/**
 * Created by Huqin on 2019/12/23
 */
public enum RoleType {


    ADMIN("管理员"),
    OPERATIONAL_MERCHANT("运营商"),
    PLATFORM_MERCHANT("平台商"),
    FINANCIAL_INSTITUTIONS("金融机构"),
    CUSTOMER("客户"),
    AGENT("经销商"),
    REPLENISH("运维人员");

    private String desc;

    RoleType(String desc) {
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    public static String getDescByName(String name){
        if(StringUtils.isBlank(name)){
            return "";
        }
        return RoleType.valueOf(name).desc;
    }
}
